package com.lcf.app.rabbitmq.provider.config;

import com.lcf.common.model.MqConstant;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ChenFei
 * @date 2021/12/1
 */
@Configuration
public class RabbitConfig {

    /**
     * 默认交换机-简单的MQ发送与接收
     *
     * @return
     */
    @Bean
    public Queue queue() {
        //创建一个队列，并选择持久化
        return new Queue(MqConstant.DEFAULT_QUEUE, true);
    }

}
